﻿<%@ page language="java" contentType="text/html; charset=UTF-8"
         pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%
    String path = request.getContextPath();
    String basePath = request.getScheme() + "://"
            + request.getServerName() + ":" + request.getServerPort()
            + path + "/";
%>
<!DOCTYPE html>
<html lang="en">
<head>
    <base href="<%=basePath%>">
    <!-- jsp文件头和头部 -->
    <%@ include file="../index/top.jsp"%>
    <script type="text/javascript">
        setTimeout("top.hangge()",500);
    </script>
</head>
<body class="no-skin">

<!-- /section:basics/navbar.layout -->
<div class="main-container" id="main-container">
    <!-- /section:basics/sidebar -->
    <img src="static/images/welcome.jpg" style="position:fixed;width:100%;height:100%;background-size:cover;" class="img-responsive center-block"/>
</div>
<!-- /.main-content -->


<%--<!-- 返回顶部 -->--%>
<%--<a href="#" id="btn-scroll-up" class="btn-scroll-up btn btn-sm btn-inverse">--%>
<%--<i class="ace-icon fa fa-angle-double-up icon-only bigger-110"></i>--%>
<%--</a>--%>

<%--</div>--%>
<!-- /.main-container -->

<!-- basic scripts -->
<!-- 页面底部js¨ -->
<%@ include file="../index/foot.jsp"%>
<!-- ace scripts -->
<script src="static/ace/js/ace/ace.js"></script>
<!--提示框-->
<script type="text/javascript" src="static/js/jquery.tips.js"></script>
<script type="text/javascript">

    $(top.hangge());

    //定位当前模版
    $(function(){
        var nowMoban = "${pd.moban}";
        if("createHtml" == nowMoban){
            $("#moban1").prop("checked", "checked");
        }else if("createHtml2" == nowMoban){
            $("#moban2").prop("checked", "checked");
        }else if("createHtml3" == nowMoban){
            $("#moban3").prop("checked", "checked");
        }else if("createHtml4" == nowMoban){
            $("#moban4").prop("checked", "checked");
        }
    });

    //选模版
    function setMoban(value){

        if("createHtml" == value){
            $("#moban1").prop("checked", "checked");
        }else if("createHtml2" == value){
            $("#moban2").prop("checked", "checked");
        }
        else if("createHtml3" == value){
            $("#moban3").prop("checked", "checked");
        }
        else if("createHtml4" == value){
            $("#moban4").prop("checked", "checked");
        }

        top.jzts();
        $.ajax({
            type: "POST",
            url: '<%=basePath%>createHtml/setMoban.do',
            data: {moban:value,tm:new Date().getTime()},
            dataType:'json',
            cache: false,
            success: function(data){
                proAll();
                top.hangge();
            }
        });
    }

    //访问网站首页
    function openIndex(){
        window.open("<%=basePath%>");
    }

    //一键生成所有页面
    function proAll(){
        proHome();
        proCooperation();
        proAboutus();
        proProduct();
        proNews();
        proContactus();
    }

    //生成首页
    function proHome(){
        top.jzts();
        $.ajax({
            type: "POST",
            url: '<%=basePath%>createHtml/proHome.do',
            data: {tm:new Date().getTime()},
            dataType:'json',
            cache: false,
            success: function(data){
                if("success" == data.result){
                    $("#proHome").tips({
                        side:3,
                        msg:'生成完毕',
                        bg:'#AE81FF',
                        time:5
                    });
                }
                top.hangge();
            }
        });
    }

    //生成合作共赢页面
    function proCooperation(){
        top.jzts();
        $.ajax({
            type: "POST",
            url: '<%=basePath%>createHtml/proCooperation.do',
            data: {tm:new Date().getTime()},
            dataType:'json',
            cache: false,
            success: function(data){
                if("success" == data.result){
                    $("#proCooperation").tips({
                        side:3,
                        msg:'生成完毕',
                        bg:'#AE81FF',
                        time:5
                    });
                }
                top.hangge();
            }
        });
    }

    //生成关于我们页面
    function proAboutus(){
        top.jzts();
        $.ajax({
            type: "POST",
            url: '<%=basePath%>createHtml/proAboutus.do',
            data: {tm:new Date().getTime()},
            dataType:'json',
            cache: false,
            success: function(data){
                if("success" == data.result){
                    $("#proAboutus").tips({
                        side:3,
                        msg:'生成完毕',
                        bg:'#AE81FF',
                        time:5
                    });
                }
                top.hangge();
            }
        });
    }

    //生成产品案例页面
    function proProduct(){
        top.jzts();
        $.ajax({
            type: "POST",
            url: '<%=basePath%>createHtml/proProduct.do',
            data: {tm:new Date().getTime()},
            dataType:'json',
            cache: false,
            success: function(data){
                if("success" == data.result){
                    $("#proProduct").tips({
                        side:3,
                        msg:'生成完毕',
                        bg:'#AE81FF',
                        time:5
                    });
                }
                top.hangge();
            }
        });
    }

    //生成新闻动态页面
    function proNews(){
        top.jzts();
        $.ajax({
            type: "POST",
            url: '<%=basePath%>createHtml/proNews.do',
            data: {tm:new Date().getTime()},
            dataType:'json',
            cache: false,
            success: function(data){
                if("success" == data.result){
                    $("#proNews").tips({
                        side:3,
                        msg:'生成完毕',
                        bg:'#AE81FF',
                        time:5
                    });
                }
                top.hangge();
            }
        });
    }

    //生成联系我们页面
    function proContactus(){
        top.jzts();
        $.ajax({
            type: "POST",
            url: '<%=basePath%>createHtml/proContactus.do',
            data: {tm:new Date().getTime()},
            dataType:'json',
            cache: false,
            success: function(data){
                if("success" == data.result){
                    $("#proContactus").tips({
                        side:3,
                        msg:'生成完毕',
                        bg:'#AE81FF',
                        time:5
                    });
                }
                top.hangge();
            }
        });
    }
</script>
</body>
</html>